package org.particlethink.entry;

public enum OrderStatus implements IntEnum {
    Unshipped(1),//待发货
    Refuse(2),//异常退回
    InProgress(3),//进行中
    Done(4);//已完成

    private final int code;

    OrderStatus(int code) {
        this.code = code;
    }

    public boolean IsUnshipped() {
        return this == Unshipped;
    }

    public int getCode() {
        return code;
    }

    public String toString() {
        switch (this) {
            case Unshipped:
                return "待发货";
            case Refuse:
                return "异常退回";
            case InProgress:
                return "进行中";
            case Done:
                return "已完成";
            default:
                return "";
        }
    }
}

